import ToolToken from '@/tool/auth/ToolToken';

const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];

export default function(router) {
	router.beforeEach(async (to, from, next) => {
		let toPath = to.path;
		// if (!ToolToken.token() && whiteList.filter(white => toPath.startsWith(white)).length < 1) {
		// 	return next(`/login?redirect=${to.fullPath}`);
		// }
		next()
	})
	
	router.afterEach(() => {})
}
